<?php

use Phinx\Migration\AbstractMigration;

class AddColumnIsPopupInMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table("message")
            ->addColumn("is_popup", 'enum', [
                'values' => 'yes,no',
                'default' => 'no',
                'null' => false,
                'comment' => '是否弹出提示',
            ])->save();
    }

    public function down()
    {
        $this->table("message")
            ->removeColumn("is_popup")
            ->save();
    }
}
